#include <iostream>
#include <vector>
#include <list>
using namespace std;

int main(){
    list<const char *> slist = {"hello", "world", "!"};
    vector<string> svec(slist.begin(), slist.end());

    // for(auto it = slist.begin(); it != slist.end(); ++it)
    // {
    //     svec.push_back(*it);
    // }

    // svec.assign(slist.begin(), slist.end()); //将vector中的内容用使用assign进行替换

    cout << svec.capacity() << " " << svec.size() << " " <<
        svec[0] << " " << svec[svec.size() - 1] << endl;

    return 0;
}